#coding:utf-8
# 程序目标，读取1.bmp，然后以16进制方式写到txt文件


f = open("fingerModel.txt","rb")
outfile = open("out.txt","wb")
i = 0
while 1:
    c = f.read(1)
    i = i + 1
    if not c:
        break
    if i%32 == 0:
        outfile.write("\n")
    else:
        if ord(c) <= 15:
            outfile.write("0x0"+hex(ord(c))[2:]+" ")
        else:
            outfile.write(hex(ord(c))+" ")
outfile.close()
f.close()

